<?php $this->load->view('common/pagehead')?>
<?php $this->load->view('common/header')?>
<div id="content" class="pgwrapper1" style="background:#fff">
<div class="pgwrapper">
<div class="spec_15"></div>
<?php $this->load->view('common/browseByAlphabet'); ?>
<div class="spec_15"></div>
<div class="left w655 mr15">
<div class="bx_shw">
<div class="bg1 p10_15 txt1"><h2><?php echo $categoryDetailsArray[0]['category_name']; ?></h2></div>
<div class="p15 oflw">
<div class="left w102 mr15"><img src="/public/images/large_<?php echo $categoryDetailsArray[0]['category_url']; ?>.png" alt="" class="bdr_logo logo_shadow" /></div>
<div class="ml120 txt_categ"><?php echo $categoryDetailsArray[0]['category_description']; ?></div>
</div>
</div>
<div class="spec_15"></div>
<div id="allStore" class="mlr15">
<div class="txt5 bdr_b pb10"><h2>Top <span class="txt_pnk">Stores</span></h2></div>
<ul class="storeLnk">
<?php foreach($categoryStoresArray as $temp){ ?>
<li><a href="/<?php echo $temp['store_url']; ?>-coupons"><?php echo $temp['store_name']; ?></a></li>
<?php } ?>
</ul>
</div>
<div class="spec_15"></div>
<div class="left w100 mr30 bx_shw">
<div class="bg1 p10_15">
<h1>Top 5 <span class="txt_pnk">Coupons</span></h1>
</div>
<?php foreach($topCatCouponsArray as $temp){ ?>
<div class="p15 bdr_b">
<div class="left w110"><a href="/<?php echo $temp['store_url']; ?>-coupons"><img src="<?php echo $temp['store_image']; ?>" alt="" class="bdr_logo logo_shadow" /></a><br /><br />
<?php if($temp['coupon_bank']!=0){ ?>
<span class="plus">+</span><br />
<img src="/public/images/logo_<?php echo $temp['coupon_bank']; ?>.png" alt="" hspace="16" vspace="11" />
<?php } ?>
</div>
<div class="ml120"><span class="txt_cpn"><?php echo $temp['coupon_name']; ?></span>
<div class="spec_10"></div>
<div class="bg_code w441" style="position:relative">
<div class="left"><input type="button" value="Click to Reveal" onclick="showCouponCode('getCode<?php echo $temp['coupon_id']; ?>','<?php echo $temp['coupon_code']; ?>','<?php echo $temp['store_id']; ?>')" class="get_code" /></div>
<div class="bg_arrow"></div>
<div class="left" id="getCode<?php echo $temp['coupon_id']; ?>"><input type="button" onclick="showCouponCode('getCode<?php echo $temp['coupon_id']; ?>','<?php echo $temp['coupon_code']; ?>','<?php echo $temp['store_id']; ?>')" value="" class="get_code1" /></div>
</div>
<div class="spec_10"></div>
<div><?php echo $temp['coupon_description']; ?></div>
<div class="spec_10"></div>
<div class="left"><img src="/public/images/cal_icon.png" alt="" /></div>
<div class="left mlr10_20 txt3">Added on: <?php echo date("jS F", strtotime($temp['coupon_startdate'])); ?></div>
<div class="left"><img src="/public/images/cal_icon.png" alt="" /></div>
<div class="left mlr10_20 txt3">Expires on: <?php echo date("jS F", strtotime($temp['coupon_expiredate'])); ?></div>
</div>
</div>
<?php } ?>
<?php if(!empty($similarOffersArray)){ foreach($similarOffersArray as $temp){ 
                if($temp['coupon_affilateurl']!=''){ $affUrl=$temp['coupon_affilateurl']; }else{ $affUrl=$temp['store_affilateurl']; } ?>
<div class="p15 bdr_b">
<div class="left w110"><a href="/waitingpage/<?php echo $temp['coupon_id']; ?>/<?php echo $temp['store_id']; ?>" target="_blank" rel="nofollow"><img src="<?php echo $temp['store_image']; ?>" alt="" class="bdr_logo logo_shadow" /></a><?php if($temp['coupon_bank']!=0){ ?>
<span class="plus">+</span><br />
<img src="/public/images/logo_<?php echo $temp['coupon_bank']; ?>.png" alt="" hspace="16" />
<?php } ?></div>
<div class="ml120"><a href="/waitingpage/<?php echo $temp['coupon_id']; ?>/<?php echo $temp['store_id']; ?>" target="_blank" rel="nofollow" class="offer_lnk"><?php echo $temp['coupon_name']; ?></a><br />
<?php echo $temp['coupon_description']; ?>
<div class="spec_10"></div>
<div class="left"><img src="/public/images/cal_icon.png" alt="" /></div>
<div class="left mlr10_20 txt3">Added on: <?php echo date("jS F", strtotime($temp['coupon_startdate'])); ?></div>
<div class="left"><img src="/public/images/cal_icon.png" alt="" /></div>
<div class="left mlr10_20 txt3">Expires on: <?php echo date("jS F", strtotime($temp['coupon_expiredate'])); ?></div>
</div>
</div>
<?php } } ?>
<div class="spec_2"></div>
</div>
</div>
<div class="left w320">
<?php $this->load->view('common/categoryPanel'); ?>
</div>
<div class="spec_15"></div>
<?php $this->load->view('common/search'); ?>
<div class="spec_15"></div>
<?php $this->load->view('common/banners'); ?>
<div class="spec_15"></div>
</div>
</div>
<?php $this->load->view('common/footer')?>